3.77 \(\int \frac{A+B \sin (e+f x)}{(a+a \sin (e+f x))^3 (c-c \sin (e+f x))^3} \, dx\)

Optimal. Leaf size=84 \[ \frac{A \tan ^5(e+f x)}{5 a^3 c^3 f}+\frac{2 A \tan ^3(e+f x)}{3 a^3 c^3 f}+\frac{A \tan (e+f x)}{a^3 c^3 f}+\frac{B \sec ^5(e+f x)}{5 a^3 c^3 f} \]

[Out]

(B*Sec[e + f*x]^5)/(5*a^3*c^3*f) + (A*Tan[e + f*x])/(a^3*c^3*f) + (2*A*Tan[e + f*x]^3)/(3*a^3*c^3*f) + (A*Tan[
e + f*x]^5)/(5*a^3*c^3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.151853, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {2967, 2669, 3767} \[ \frac{A \tan ^5(e+f x)}{5 a^3 c^3 f}+\frac{2 A \tan ^3(e+f x)}{3 a^3 c^3 f}+\frac{A \tan (e+f x)}{a^3 c^3 f}+\frac{B \sec ^5(e+f x)}{5 a^3 c^3 f} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*Sin[e + f*x])/((a + a*Sin[e + f*x])^3*(c - c*Sin[e + f*x])^3),x]

[Out]

(B*Sec[e + f*x]^5)/(5*a^3*c^3*f) + (A*Tan[e + f*x])/(a^3*c^3*f) + (2*A*Tan[e + f*x]^3)/(3*a^3*c^3*f) + (A*Tan[
e + f*x]^5)/(5*a^3*c^3*f)

Rule 2967

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && I
ntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))

Rule 2669

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(b*(g*Cos[
e + f*x])^(p + 1))/(f*g*(p + 1)), x] + Dist[a, Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x]
&& (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin{align*} \int \frac{A+B \sin (e+f x)}{(a+a \sin (e+f x))^3 (c-c \sin (e+f x))^3} \, dx &=\frac{\int \sec ^6(e+f x) (A+B \sin (e+f x)) \, dx}{a^3 c^3}\\ &=\frac{B \sec ^5(e+f x)}{5 a^3 c^3 f}+\frac{A \int \sec ^6(e+f x) \, dx}{a^3 c^3}\\ &=\frac{B \sec ^5(e+f x)}{5 a^3 c^3 f}-\frac{A \operatorname{Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,-\tan (e+f x)\right )}{a^3 c^3 f}\\ &=\frac{B \sec ^5(e+f x)}{5 a^3 c^3 f}+\frac{A \tan (e+f x)}{a^3 c^3 f}+\frac{2 A \tan ^3(e+f x)}{3 a^3 c^3 f}+\frac{A \tan ^5(e+f x)}{5 a^3 c^3 f}\\ \end{align*}

Mathematica [A]  time = 0.198097, size = 65, normalized size = 0.77 \[ \frac{A \left (\frac{1}{5} \tan ^5(e+f x)+\frac{2}{3} \tan ^3(e+f x)+\tan (e+f x)\right )}{a^3 c^3 f}+\frac{B \sec ^5(e+f x)}{5 a^3 c^3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Sin[e + f*x])/((a + a*Sin[e + f*x])^3*(c - c*Sin[e + f*x])^3),x]

[Out]

(B*Sec[e + f*x]^5)/(5*a^3*c^3*f) + (A*(Tan[e + f*x] + (2*Tan[e + f*x]^3)/3 + Tan[e + f*x]^5/5))/(a^3*c^3*f)

________________________________________________________________________________________

Maple [B]  time = 0.08, size = 227, normalized size = 2.7 \begin{align*} 2\,{\frac{1}{f{a}^{3}{c}^{3}} \left ( -1/4\,{\frac{A+B}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) ^{4}}}-1/5\,{\frac{A/2+B/2}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) ^{5}}}-1/2\,{\frac{1}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) ^{2}} \left ({\frac{7\,A}{8}}+5/8\,B \right ) }-{\frac{A/2+3/16\,B}{\tan \left ( 1/2\,fx+e/2 \right ) -1}}-1/3\,{\frac{1}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) ^{3}} \left ({\frac{11\,A}{8}}+{\frac{9\,B}{8}} \right ) }-1/4\,{\frac{-A+B}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{4}}}-1/2\,{\frac{1}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{2}} \left ( -{\frac{7\,A}{8}}+5/8\,B \right ) }-1/5\,{\frac{A/2-B/2}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{5}}}-{\frac{A/2-3/16\,B}{\tan \left ( 1/2\,fx+e/2 \right ) +1}}-1/3\,{\frac{1}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{3}} \left ({\frac{11\,A}{8}}-{\frac{9\,B}{8}} \right ) } \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^3/(c-c*sin(f*x+e))^3,x)

[Out]

2/f/a^3/c^3*(-1/4*(A+B)/(tan(1/2*f*x+1/2*e)-1)^4-1/5*(1/2*A+1/2*B)/(tan(1/2*f*x+1/2*e)-1)^5-1/2*(7/8*A+5/8*B)/
(tan(1/2*f*x+1/2*e)-1)^2-(1/2*A+3/16*B)/(tan(1/2*f*x+1/2*e)-1)-1/3*(11/8*A+9/8*B)/(tan(1/2*f*x+1/2*e)-1)^3-1/4
*(-A+B)/(tan(1/2*f*x+1/2*e)+1)^4-1/2*(-7/8*A+5/8*B)/(tan(1/2*f*x+1/2*e)+1)^2-1/5*(1/2*A-1/2*B)/(tan(1/2*f*x+1/
2*e)+1)^5-(1/2*A-3/16*B)/(tan(1/2*f*x+1/2*e)+1)-1/3*(11/8*A-9/8*B)/(tan(1/2*f*x+1/2*e)+1)^3)

________________________________________________________________________________________

Maxima [A]  time = 0.976002, size = 81, normalized size = 0.96 \begin{align*} \frac{\frac{{\left (3 \, \tan \left (f x + e\right )^{5} + 10 \, \tan \left (f x + e\right )^{3} + 15 \, \tan \left (f x + e\right )\right )} A}{a^{3} c^{3}} + \frac{3 \, B}{a^{3} c^{3} \cos \left (f x + e\right )^{5}}}{15 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^3/(c-c*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

1/15*((3*tan(f*x + e)^5 + 10*tan(f*x + e)^3 + 15*tan(f*x + e))*A/(a^3*c^3) + 3*B/(a^3*c^3*cos(f*x + e)^5))/f

________________________________________________________________________________________

Fricas [A]  time = 1.86647, size = 138, normalized size = 1.64 \begin{align*} \frac{{\left (8 \, A \cos \left (f x + e\right )^{4} + 4 \, A \cos \left (f x + e\right )^{2} + 3 \, A\right )} \sin \left (f x + e\right ) + 3 \, B}{15 \, a^{3} c^{3} f \cos \left (f x + e\right )^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^3/(c-c*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

1/15*((8*A*cos(f*x + e)^4 + 4*A*cos(f*x + e)^2 + 3*A)*sin(f*x + e) + 3*B)/(a^3*c^3*f*cos(f*x + e)^5)

________________________________________________________________________________________

Sympy [A]  time = 104.988, size = 1506, normalized size = 17.93 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))**3/(c-c*sin(f*x+e))**3,x)

[Out]

Piecewise((-60*A*tan(e/2 + f*x/2)**9/(30*a**3*c**3*f*tan(e/2 + f*x/2)**10 - 150*a**3*c**3*f*tan(e/2 + f*x/2)**
8 + 300*a**3*c**3*f*tan(e/2 + f*x/2)**6 - 300*a**3*c**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*c**3*f*tan(e/2 + f*x/
2)**2 - 30*a**3*c**3*f) + 80*A*tan(e/2 + f*x/2)**7/(30*a**3*c**3*f*tan(e/2 + f*x/2)**10 - 150*a**3*c**3*f*tan(
e/2 + f*x/2)**8 + 300*a**3*c**3*f*tan(e/2 + f*x/2)**6 - 300*a**3*c**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*c**3*f*
tan(e/2 + f*x/2)**2 - 30*a**3*c**3*f) - 232*A*tan(e/2 + f*x/2)**5/(30*a**3*c**3*f*tan(e/2 + f*x/2)**10 - 150*a
**3*c**3*f*tan(e/2 + f*x/2)**8 + 300*a**3*c**3*f*tan(e/2 + f*x/2)**6 - 300*a**3*c**3*f*tan(e/2 + f*x/2)**4 + 1
50*a**3*c**3*f*tan(e/2 + f*x/2)**2 - 30*a**3*c**3*f) + 80*A*tan(e/2 + f*x/2)**3/(30*a**3*c**3*f*tan(e/2 + f*x/
2)**10 - 150*a**3*c**3*f*tan(e/2 + f*x/2)**8 + 300*a**3*c**3*f*tan(e/2 + f*x/2)**6 - 300*a**3*c**3*f*tan(e/2 +
 f*x/2)**4 + 150*a**3*c**3*f*tan(e/2 + f*x/2)**2 - 30*a**3*c**3*f) - 60*A*tan(e/2 + f*x/2)/(30*a**3*c**3*f*tan
(e/2 + f*x/2)**10 - 150*a**3*c**3*f*tan(e/2 + f*x/2)**8 + 300*a**3*c**3*f*tan(e/2 + f*x/2)**6 - 300*a**3*c**3*
f*tan(e/2 + f*x/2)**4 + 150*a**3*c**3*f*tan(e/2 + f*x/2)**2 - 30*a**3*c**3*f) + 3*B*tan(e/2 + f*x/2)**10/(30*a
**3*c**3*f*tan(e/2 + f*x/2)**10 - 150*a**3*c**3*f*tan(e/2 + f*x/2)**8 + 300*a**3*c**3*f*tan(e/2 + f*x/2)**6 -
300*a**3*c**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*c**3*f*tan(e/2 + f*x/2)**2 - 30*a**3*c**3*f) - 75*B*tan(e/2 + f
*x/2)**8/(30*a**3*c**3*f*tan(e/2 + f*x/2)**10 - 150*a**3*c**3*f*tan(e/2 + f*x/2)**8 + 300*a**3*c**3*f*tan(e/2
+ f*x/2)**6 - 300*a**3*c**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*c**3*f*tan(e/2 + f*x/2)**2 - 30*a**3*c**3*f) + 30
*B*tan(e/2 + f*x/2)**6/(30*a**3*c**3*f*tan(e/2 + f*x/2)**10 - 150*a**3*c**3*f*tan(e/2 + f*x/2)**8 + 300*a**3*c
**3*f*tan(e/2 + f*x/2)**6 - 300*a**3*c**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*c**3*f*tan(e/2 + f*x/2)**2 - 30*a**
3*c**3*f) - 150*B*tan(e/2 + f*x/2)**4/(30*a**3*c**3*f*tan(e/2 + f*x/2)**10 - 150*a**3*c**3*f*tan(e/2 + f*x/2)*
*8 + 300*a**3*c**3*f*tan(e/2 + f*x/2)**6 - 300*a**3*c**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*c**3*f*tan(e/2 + f*x
/2)**2 - 30*a**3*c**3*f) + 15*B*tan(e/2 + f*x/2)**2/(30*a**3*c**3*f*tan(e/2 + f*x/2)**10 - 150*a**3*c**3*f*tan
(e/2 + f*x/2)**8 + 300*a**3*c**3*f*tan(e/2 + f*x/2)**6 - 300*a**3*c**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*c**3*f
*tan(e/2 + f*x/2)**2 - 30*a**3*c**3*f) - 15*B/(30*a**3*c**3*f*tan(e/2 + f*x/2)**10 - 150*a**3*c**3*f*tan(e/2 +
 f*x/2)**8 + 300*a**3*c**3*f*tan(e/2 + f*x/2)**6 - 300*a**3*c**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*c**3*f*tan(e
/2 + f*x/2)**2 - 30*a**3*c**3*f), Ne(f, 0)), (x*(A + B*sin(e))/((a*sin(e) + a)**3*(-c*sin(e) + c)**3), True))

________________________________________________________________________________________

Giac [A]  time = 1.24934, size = 181, normalized size = 2.15 \begin{align*} -\frac{2 \,{\left (15 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{9} + 15 \, B \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{8} - 20 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{7} + 58 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5} + 30 \, B \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 20 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 15 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 3 \, B\right )}}{15 \,{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 1\right )}^{5} a^{3} c^{3} f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^3/(c-c*sin(f*x+e))^3,x, algorithm="giac")

[Out]

-2/15*(15*A*tan(1/2*f*x + 1/2*e)^9 + 15*B*tan(1/2*f*x + 1/2*e)^8 - 20*A*tan(1/2*f*x + 1/2*e)^7 + 58*A*tan(1/2*
f*x + 1/2*e)^5 + 30*B*tan(1/2*f*x + 1/2*e)^4 - 20*A*tan(1/2*f*x + 1/2*e)^3 + 15*A*tan(1/2*f*x + 1/2*e) + 3*B)/
((tan(1/2*f*x + 1/2*e)^2 - 1)^5*a^3*c^3*f)